﻿@using NOAH.CMS.Repository;
@{
    List<Subject> subjects = new List<Subject>();
    List<Course> courses = new List<Course>();

    subjects = (List<Subject>)ViewBag.Subjects;
    courses = (List<Course>)ViewBag.Courses;
    int i = 0;
}
<br />
<br />
<div id="newsListPage">
    <div class="pattern-box">
        <div class="c-block-01">
            <h1 class="pageTitle">
                <a href="javascript:void(0)" style="color: #3555A5; text-decoration: none;">@ViewBag.SubjectTitle</a></h1>
            <div class="clear"></div>
            @{
                foreach (Course s in courses)
                {
                    ++i;
                <text>

                <div class="news_page_item" style="clear: both;">

                    <div class="news_page_copy" style="margin: 0; padding-left: 10px;">
                        <div class="news_page_date" style="float: left;">
                            <div class="news_page_date_c">
                                @i
                            </div>
                        </div>
                        <div style="float: left;">
                            <a class="title" title="@s.Name" href="@s.SEOLink">@s.Name</a><div class="clearfix">&nbsp;</div>

                            <p style="width: 540px;">
                                @s.ShortContent
                                <br />
                                <span>Ngày khai giảng: <b>@string.Format("{0:dd/MM/yyyy}", @s.DateStart)</b></span>
                                <br />
                                <span>Học phí: <b>@Util.AddDot(s.Price)</b>&nbsp;/1 học viên</span><br />

                                <p style="text-align: right; padding-right: 50px;">
                                    <a title="@s.Name"  href="/registration/step2.aspx?id=@s.ID" class="tsc_buttons2 small blue popup">Đăng ký</a>

                                </p>
                            </p>

                        </div>

                    </div>
                    <div class="clearfix">&nbsp;</div>
                </div>
                <div class="clearfix" style="clear: both;">&nbsp;</div>
                <br />
                <br />
                </text>
                }

                if (courses.Count == 0)
                { 
                <text>
                <div class="news_page_item" style="clear: both;">
                </div>

                </text>

                }
            }
        </div>
        <div class="c-block-02">
            <div style="padding-top: 0;">
                <h1 class="pageTitle1">
                    <a style="color: #3555A5; text-decoration: none;" href="javascript:void(0)">Môn học</a></h1>
                @* <div class="tsc_ribbon_banner" style="margin-top: 0; margin-bottom: 5px;">
                    <div class="ribbon-banner fold-straight lblue" style="width: 280px; font-family: 'Open Sans', Arial;"><span>Môn học</span></div>
                </div>*@
                <ul style="padding: 10px; border: 2px dashed #1E4283; border-top: none;">
                    @{
                        foreach (Subject s in subjects)
                        { 
                        <text>
                        <li><a href="@s.SEOLink" class="subjectLink">»&nbsp;@s.Name</a></li>
                        </text>
                        }
                    }
                    <li><a href="/course/list/0" class="subjectLink">»&nbsp;Tất cả</a></li>
                </ul>
            </div>
        </div>

        <div class="clear"></div>

    </div>
</div>
<br />
